import request from '@/utils/request'

// 查询暂存登记列表
export function listStaging(query) {
  return request({
    url: '/oms/staging/list',
    method: 'get',
    params: query
  })
}

export function getStagingPageList(query) {
  return request({
    url: '/oms/staging/getStagingPageList',
    method: 'get',
    params: query
  })
}

export function getStagingInfoByPno(query) {
  return request({
    url: '/oms/staging/getStagingInfoByPno',
    method: 'get',
    params: query
  })
}

export function encryptProBase() {
  return request({
    url: '/sacw/encrypt/encryptProBase',
    method: 'post',
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/oms/staging/initBean',
        method: 'post'
    })
}

// 查询暂存登记详细
export function getStaging(id) {
  return request({
    url: '/oms/staging/' + id,
    method: 'get'
  })
}

export function getStagingByNo(query) {
  return request({
    url: '/oms/staging/getStagingInfoByPno',
    method: 'get',
    params: query
  })
}

// 新增暂存登记
export function addStaging(data) {
  return request({
    url: '/oms/staging',
    method: 'post',
    data: data
  })
}

// 修改暂存登记
export function updateStaging(data) {
  return request({
    url: '/oms/staging',
    method: 'put',
    data: data
  })
}

// 删除暂存登记
export function delStaging(id) {
  return request({
    url: '/oms/staging/' + id,
    method: 'delete'
  })
}

export function updateTransferIds(id) {
  return request({
    url: '/oms/staging/transferIds' + id,
    method: 'post'
  })
}
